
from langchain.storage import LocalFileStore

# Instantiate the LocalFileStore with the root path
file_store = LocalFileStore("1.ts")

# Set values for keys
file_store.mset([("key1", b"value1"), ("key2", b"value2")])

# Get values for keys
values = file_store.mget(["key1", "key2"])  # Returns [b"value1", b"value2"]

# Delete keys
file_store.mdelete(["key1"])


# Iterate over keys
for key in file_store.yield_keys():
    print(key)  # noqa: T201